package com.news.db.info;

public class ContentInfo {

	public static final String DATABASE_NAME = "news.db";
	public static final String DATABASE_TABLE = "content_info";
	public static final int DATABASE_VERSION = 1;
	
	public static final String KEY_ID = "_id";
	public static final String COLUMNID = "columnid";
	public static final String TITTLE = "contenttittle";
	public static final String URL = "contenturl";
	public static final String PUBDATE = "contentpubdate";
	public static final String CONTENTREAD = "contentread"; 
	public static final String SUMMARY = "contentsummary";
	public static final String CONTENT = "content"; // 'rss文章内容'



	public static final int CONTENT_KEY_ID = 0; // 'rss文章内容id'
	public static final int CONTENT_COLUMNID = 1; // 'rss文章内容唯一标识'
	public static final int CONTENT_TITTLE = 2; // 'rss文章内容标题'
	public static final int CONTENT_URL = 3; // rss文章内容url
	public static final int CONTENT_PUBDATE = 4; // rss日期
	public static final int CONTENT_CONTENTREAD = 5; // 'rss文章是否已读
	public static final int CONTENT_SUMMARY = 6; // 'rss文章内容简介
	public static final int CONTENT_CONTENT = 7; // 文章内容
	
	public static final String[] dbColumns = new String[] { KEY_ID, COLUMNID,
		TITTLE, URL,  PUBDATE, CONTENTREAD, SUMMARY, CONTENT};


	/**
	 * 忽略重复插入
	 */
	public static final String SQL_CREATE = "CREATE TABLE IF NOT EXISTS content_info ("
			+ "_id INTEGER PRIMARY KEY AUTOINCREMENT,"
			+ "columnid VARCHAR(100) NOT NULL,"
			+ "contenttittle VARCHAR(100) NOT NULL,"
			+ "contenturl VARCHAR(100) NOT NULL,"
			+ "contentpubdate VARCHAR(100) NOT NULL,"
			+ "contentread bit ,"
			+ "contentsummary TEXT,"
			+ "content TEXT,"
			+ "unique(contenturl) ON CONFLICT IGNORE )";
}
